package org.javaboy.consumer.controller;

import org.javaboy.commons.model.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.client.RestTemplate;

public interface ICallUserService {
    RestTemplate restTemplate = new RestTemplate();

    @GetMapping("/provider/user")
    User getUserById(@RequestParam("id") Integer id, @RequestHeader("token") String token);


/*    public User addUser(User user) {
        return restTemplate.postForObject("http://provider/user", user, User.class);
    }

    public void deleteUser(Integer id) {
        restTemplate.delete("http://provider/user/{id}", id);
    }

    public void updateUser(User user) {
        restTemplate.put("http://provider/user", user);
    }*/

}
